<script setup>
import {ref, watchEffect} from "vue";

const a = ref(0)
watchEffect(() => {
  console.log("立即执行一次")
  if (a.value > 10) {
    console.log("a>10")
  }
})
</script>

<template>

</template>

<style scoped>

</style>